package com.bole.dao;

import com.bole.pojo.AdminRoleDo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import javax.transaction.Transactional;
import java.util.List;

@Transactional
public interface AdminRoleDao extends JpaRepository<AdminRoleDo,Long> {
    @Query(value = "select role_id from admin_role where admin_id = ?1",nativeQuery = true)
    Long findRoleByAdminId(Long id);

    AdminRoleDo findByAdminId(Long id);
}
